From 50390a849a4580a7842dad4ab2bae6fa0794a045 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Thu, 18 May 2006 20:09:01 +0000 Subject: [PATCH] Small namespace collision in makedoc Also, more rewrites. --- gpsbabel/xmldoc/filters/arc.xml | 64 +++++++++---------- gpsbabel/xmldoc/filters/interpolate.xml | 47 ++++++++------ .../xmldoc/filters/options/arc-distance.xml | 13 ++++ .../xmldoc/filters/options/arc-exclude.xml | 5 ++ gpsbabel/xmldoc/filters/options/arc-file.xml | 12 ++++ .../xmldoc/filters/options/arc-points.xml | 10 +++ .../filters/options/interpolate-distance.xml | 12 ++++ .../filters/options/interpolate-route.xml | 6 +- .../filters/options/interpolate-time.xml | 11 ++++ gpsbabel/xmldoc/makedoc | 3 + 10 files changed, 130 insertions(+), 53 deletions(-) diff --git a/gpsbabel/xmldoc/filters/arc.xml b/gpsbabel/xmldoc/filters/arc.xml index 3e379af96..e3a032dc6 100644 --- a/gpsbabel/xmldoc/filters/arc.xml +++ b/gpsbabel/xmldoc/filters/arc.xml @@ -1,18 +1,18 @@ - - - The arc filter is designed to include points based on - their proximity to an arc, which is a series of connected - line segments similar to a route or a track but without any - associated data other than the coordinates. + +This filter keeps or removes waypoints based on their proximity to an arc, +which is a series of connected line segments similar to a route or a track +but without any associated data other than the coordinates. - The arc is defined in a file whose name must be - provided with the option to the filter. - That file contains pairs of coordinates for the vertices of - the arc, one coordinate pair per line. Comments may be - included by preceding them with a '#' character. An arc file - looks something like this sample: + + +The arc is defined in a file whose name must be provided with the +. That file contains pairs of coordinates for the +vertices of the arc, one coordinate pair per line. Comments may be +included by preceding them with a '#' character. An arc file looks +something like this sample: - + + # Lima Road/SR3 north of Fort Wayne, Indiana 41.150064468 -85.166207433 41.150064468 -85.165371895 @@ -20,27 +20,23 @@ 41.147832870 -85.164771080 41.146631241 -85.164384842 41.144270897 -85.163655281 -41.141953468 -85.162882805 - An arc file may optionally contain gaps in the arc. You can - specify such a gap by inserting a line containing "#break" - either on a line by itself or after the coordinates of the - starting point of the new arc segment. +41.141953468 -85.162882805 + + + +An arc file may optionally contain gaps in the arc. You may specify +such a gap by inserting a line containing "#break" either on a line by +itself or after the coordinates of the starting point of the new arc segment. - In addition to the file containing the arc, you should - also specify the maximum distance from the arc that will be - accepted; that distance is declared on the command line with - the - option to the filter. Distance options may be expressed in - miles () or - kilometers (). The default is - zero miles. You may also specify the exclude option, which - causes GPSBabel to only include points that are further than - the specified distance from the arc. + + +Using the arc filter + +Assuming the arc above is in a file called +lima_rd.txt, the following command line +would include only points within one mile of the section of Lima Road +covered by the arc. - For example, assuming the arc above is in a file called lima_rd.txt: - gpsbabel -i geo -f 1.loc - -x arc,file=lima_rd.txt,distance=1 \ - -o mapsend -F 2.wpt - would include only points within one mile of the - section of Lima Road covered by the arc. +gpsbabel -i geo -f 1.loc -x arc,file=lima_rd.txt,distance=1 -o mapsend -F 2.wpt + diff --git a/gpsbabel/xmldoc/filters/interpolate.xml b/gpsbabel/xmldoc/filters/interpolate.xml index 9aa46970a..81dd0f34a 100644 --- a/gpsbabel/xmldoc/filters/interpolate.xml +++ b/gpsbabel/xmldoc/filters/interpolate.xml @@ -1,19 +1,30 @@ + +This filter modifies any tracks so that either the distance or the time +between consecutive points is no less than the specified interval. Where +points are missing, the filter fills them in by following a straight +line (actually a great circle) between the adjacent points. You +must specify either the + or the option. + + +Using the interpolate filter + +This command line reads track.gpx and inserts points wherever two adjacent +trackpoints are more than 10 seconds apart: + +gpsbabel -i gpx -f track.gpx -x interpolate,time=10 -o gpx -f newtrack.gpx - - - This filter modifies any tracks so that either the distance or the time - between consecutive points is no less than the specified interval. Where - points are missing, the filter fills them in by following a straight - line (actually a great circle) between the adjacent points. You - must specify either the "distance" or the "time" option. - - gpsbabel -i gpx -f track.gpx -x interpolate,time=10 -o gpx -f newtrack.gpx - Reads track.gpx and inserts points wherever two adjacent - trackpoints are more than 10 seconds apart - gpsbabel -i gpx -f track.gpx -x interpolate,distance=15k -o gpx -f newtrack.gpx - Reads track.gpx and inserts points wherever two adjacent - trackpoints are more than 15 kilometers apart - gpsbabel -i gpx -f track.gpx -x interpolate,distance=2m -o gpx -f newtrack.gpx - Reads track.gpx and inserts points wherever two adjacent - trackpoints are more than 2 miles apart - + +This command reads track.gpx and inserts points wherever two adjacent +trackpoints are more than 15 kilometers apart: + + +gpsbabel -i gpx -f track.gpx -x interpolate,distance=15k -o gpx -f newtrack.gpx + + +This command reads track.gpx and inserts points wherever two adjacent +trackpoints are more than 2 miles apart: + + +gpsbabel -i gpx -f track.gpx -x interpolate,distance=2m -o gpx -f newtrack.gpx + diff --git a/gpsbabel/xmldoc/filters/options/arc-distance.xml b/gpsbabel/xmldoc/filters/options/arc-distance.xml index 8b1378917..83a3189ec 100644 --- a/gpsbabel/xmldoc/filters/options/arc-distance.xml +++ b/gpsbabel/xmldoc/filters/options/arc-distance.xml @@ -1 +1,14 @@ + +This option is not required, but if it is not specified the distance +defaults to zero miles, which isn't very useful. + + +This option specifies the maximum distance a point may be from the arc +without being discarded. Points that are closer to the arc are kept, while +points that are further away are discarded. + + +Distances may be specified in miles (3M) or kilometers (5K). If no units +are specified, the distance is assumed to be in miles. + diff --git a/gpsbabel/xmldoc/filters/options/arc-exclude.xml b/gpsbabel/xmldoc/filters/options/arc-exclude.xml index 8b1378917..37f84b3ba 100644 --- a/gpsbabel/xmldoc/filters/options/arc-exclude.xml +++ b/gpsbabel/xmldoc/filters/options/arc-exclude.xml @@ -1 +1,6 @@ + +When this option is specified, the usual sense of the arc filter is reversed. +That is, points that are closer than distance are discarded +while points that are further away are kept. + diff --git a/gpsbabel/xmldoc/filters/options/arc-file.xml b/gpsbabel/xmldoc/filters/options/arc-file.xml index 8b1378917..6316b64c4 100644 --- a/gpsbabel/xmldoc/filters/options/arc-file.xml +++ b/gpsbabel/xmldoc/filters/options/arc-file.xml @@ -1 +1,13 @@ + +This option is required. + + +This option specifies the name of the file containing the arc to use for +filtering. The format of the file is as described above. + + +GPSBabel supports converting any route or track to a file usable by this +filter; simply read it in the normal way and write it using the +arc file format. + diff --git a/gpsbabel/xmldoc/filters/options/arc-points.xml b/gpsbabel/xmldoc/filters/options/arc-points.xml index 8b1378917..5f1c7d347 100644 --- a/gpsbabel/xmldoc/filters/options/arc-points.xml +++ b/gpsbabel/xmldoc/filters/options/arc-points.xml @@ -1 +1,11 @@ + +When this option is specified, only points that are within the specified +distance of one of the vertices of the arc are kept. This differs from the +normal mode of operation in that in the normal mode, points that are close to +the lines between points are also kept. + + +This option makes the arc filter act like a multi-point version of the +radius filter. + diff --git a/gpsbabel/xmldoc/filters/options/interpolate-distance.xml b/gpsbabel/xmldoc/filters/options/interpolate-distance.xml index 8b1378917..4cef24f6b 100644 --- a/gpsbabel/xmldoc/filters/options/interpolate-distance.xml +++ b/gpsbabel/xmldoc/filters/options/interpolate-distance.xml @@ -1 +1,13 @@ + +This option specifies the maximum allowable distance between points in the +track. If two points in the track are further apart than this value, new +points will be inserted between them. + + +This value may be specified in units of miles (3M) or kilometers (5K). If +no units are specified, the units are assumed to be miles. + + +Either this option or the must be specified. + diff --git a/gpsbabel/xmldoc/filters/options/interpolate-route.xml b/gpsbabel/xmldoc/filters/options/interpolate-route.xml index 8b1378917..1605b9f6c 100644 --- a/gpsbabel/xmldoc/filters/options/interpolate-route.xml +++ b/gpsbabel/xmldoc/filters/options/interpolate-route.xml @@ -1 +1,5 @@ - + +If this option is specified, the interpolate filter interpolates routes +rather than tracks. Because route points do not have time stamps, it is an +error to use this option with the option. + diff --git a/gpsbabel/xmldoc/filters/options/interpolate-time.xml b/gpsbabel/xmldoc/filters/options/interpolate-time.xml index 8b1378917..4bdfe5669 100644 --- a/gpsbabel/xmldoc/filters/options/interpolate-time.xml +++ b/gpsbabel/xmldoc/filters/options/interpolate-time.xml @@ -1 +1,12 @@ + +This option specifies the maximum allowable time interval between points in the +track. If two points in the track are further apart than this value, new +points will be inserted between them. + + +This value is always specified in units of seconds. + + +Either this option or the must be specified. + diff --git a/gpsbabel/xmldoc/makedoc b/gpsbabel/xmldoc/makedoc index c562388f4..2d458e389 100755 --- a/gpsbabel/xmldoc/makedoc +++ b/gpsbabel/xmldoc/makedoc @@ -41,6 +41,9 @@ sub include { $name2 = $name; $name2 =~ s/-/_/g; + $d2 = $dir2; + $d2 =~ s:/.*::; + $name2 = $d2.'_'.$name2; print PARTS qq(\n); print FILE "\&inc_$name2;\n"; if (! -e "$dir/$dir2/$name.xml") { -- 2.30.2